# include <bits/stdc++.h>
using namespace std;
string str;
int main() {
    cin >> str;
    int nn = 1, i = 0, sum = 0;
    while(nn < 10) {
        if(isdigit(str[i]) || str[i] == 'X') {
            sum += (isdigit(str[i])) ? (nn * (str[i] - '0')) : nn * 10;
            nn++;
        }
        i++;
    }
    sum %= 11;
    if(sum == str[12] - '0' || (sum == 10 && str[12] == 'X')) {
        printf("Right");
    } else {
        str[12] = sum + '0';
        for(int i = 0; i <= 12; i++) printf("%c", (str[i] == (10 + '0')) ? 'X' : str[i]);
        
    }
}